"""huanxi URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.contrib import admin

urlpatterns = [
    url(r'^admin/', admin.site.urls),
]


################### 业务url ###################
# from backend.controllers import sign_controller
from backend.controllers import category_controller
from backend.controllers import video_controller
from backend.controllers import upload_controller
from backend.controllers import tag_controller
from backend.controllers import user_controller
# from backend.controllers import goods_controller
# from backend.controllers import goods_order_controller
# from backend.controllers import price_controller
from backend.controllers import advertisement_controller
# from backend.controllers import role_controller
# from backend.controllers import resource_controller
from backend.controllers import videotype_controller
# from backend.controllers import operator_controller
from backend.controllers import video_order_controller
from backend.controllers import team_controller
from backend.controllers import producer_controller
from backend.controllers import element_controller
from backend.controllers import serie_controller
from backend.controllers import recommend_controller
from backend.controllers import banner_controller
from backend.controllers import distributor_controller


from backend.controllers import bms_auth_controller
from backend.controllers import bms_permission_controller

urls =[
    (r'/api/login[/]?', bms_auth_controller.Login),
    (r'/api/logout[/]?', bms_auth_controller.Logout),
    (r'/api/user/info[/]?', bms_auth_controller.UserInfo),

    (r'/api/bmsuser/list[/]?', bms_permission_controller.BMSUserListController),
    (r'/api/bmsuser/detail[/]?', bms_permission_controller.BMSUserDetailController),
    (r'/api/bmsuser/reset-password[/]?', bms_permission_controller.ResetPasswordController),
    (r'/api/bmsuser/create[/]?', bms_permission_controller.CreateBMSUserController),
    (r'/api/bmsuser/update[/]?', bms_permission_controller.UpdateBMSUserController),
    (r'/api/bmsuser/delete/(\d+)[/]?', bms_permission_controller.DeleteBMSUserController),

    (r'/api/group/list[/]?', bms_permission_controller.ListController),    
    (r'/api/group/list-all-groups[/]?', bms_permission_controller.ListAllGroupsController),    
    (r'/api/group/detail[/]?', bms_permission_controller.DetailController),    
    (r'/api/group/create[/]?', bms_permission_controller.CreateGroupController), 
    (r'/api/group/update[/]?', bms_permission_controller.UpdateGroupController), 
    (r'/api/group/permissions[/]?', bms_permission_controller.GroupPermissionsController), 
    (r'/api/group/rel-permissions[/]?', bms_permission_controller.CreateGroupPermissioinController), 
    (r'/api/group/delete/(\d+)[/]?', bms_permission_controller.DeleteGroupController),

    (r'/api/permission/list[/]?', bms_permission_controller.PermissionListController),    
    (r'/api/permission/menu-items[/]?', bms_permission_controller.PermissionMunuItemsController),    
    (r'/api/permission/tree-data[/]?', bms_permission_controller.PermissionTreeController),    
    (r'/api/permission/detail[/]?', bms_permission_controller.PermissionDetailController),    
    (r'/api/permission/create[/]?', bms_permission_controller.CreatePermissionController), 
    (r'/api/permission/update[/]?', bms_permission_controller.UpdatePermissionController), 
    (r'/api/permission/delete/(\d+)[/]?', bms_permission_controller.DeletePermissionController),

    (r'/api/upload/image[/]?', upload_controller.UploadImageController),
    (r'/api/upload/video[/]?', upload_controller.UploadVideoController),

    # (r'/api/signin[/]?', sign_controller.Signin),
    # (r'/api/left-nav[/]?', sign_controller.LeftNav),

    (r'/api/video/list[/]?', video_controller.ListController),
    (r'/api/video/list-all-options[/]?', video_controller.ListAllController),
    (r'/api/video/time-list[/]?', video_controller.VideoTimeListController),
    (r'/api/video/detail[/]?', video_controller.DetailController),
    (r'/api/video/create[/]?', video_controller.CreateController),
    (r'/api/video/update[/]?', video_controller.CreateController),
    (r'/api/video/delete[/]?', video_controller.DeleteController),
    (r'/api/video/batch-delete[/]?', video_controller.BatchDeleteController),
    (r'/api/video/batch-update[/]?', video_controller.BatchUpdateVideoController),

    (r'/api/producer/list[/]?', producer_controller.ListController),
    (r'/api/producer/create[/]?', producer_controller.CreateController),
    (r'/api/producer/update[/]?', producer_controller.UpdateController),
    (r'/api/producer/delete/(\d+)[/]?', producer_controller.DeleteController),

    (r'/api/banner/list[/]?', banner_controller.List),
    (r'/api/banner/create[/]?', banner_controller.Create),
    (r'/api/banner/update[/]?', banner_controller.Update),
    (r'/api/banner/delete/(\d+)[/]?', banner_controller.Delete),

    (r'/api/serie/list[/]?', serie_controller.List),
    (r'/api/serie/list-all-options[/]?', serie_controller.ListAll),
    (r'/api/serie/create[/]?', serie_controller.CreateSerie),
    (r'/api/serie/update[/]?', serie_controller.UpdateSerie),
    (r'/api/serie/delete/(\d+)[/]?', serie_controller.SerieDelController),
    (r'/api/serie-video/list[/]?', serie_controller.ListSerieVideo),
    (r'/api/serie-video/create[/]?', serie_controller.CreateSerieVideo),
    (r'/api/serie-video/update[/]?', serie_controller.UpdateSerieVideo),
    (r'/api/serie-video/delete/(\d+)[/]?', serie_controller.SerieVideoDelController),

    (r'/api/recommend/list[/]?', recommend_controller.List),
    (r'/api/recommend/create[/]?', recommend_controller.CreateRecommend),
    (r'/api/recommend/update[/]?', recommend_controller.UpdateRecommend),
    (r'/api/recommend/delete/(\d+)[/]?', recommend_controller.RecommendDelController),

    # (r'/api/goodsorder/list[/]?', goods_order_controller.GoodsOrderListController),
    # (r'/api/goodsorder/change-state[/]?', goods_order_controller.ChangeStateController),

    (r'/api/tag/list[/]?', tag_controller.TagListController),
    (r'/api/tag/detail[/]?', tag_controller.DetailController),
    (r'/api/tag/all-list[/]?', tag_controller.AllTagController),
    (r'/api/tag/create[/]?', tag_controller.CreateTagController),
    (r'/api/tag/update[/]?', tag_controller.CreateTagController),
    (r'/api/tag/delete/(\d+)[/]?', tag_controller.DeleteTagController),

    

    # (r'/api/role/list[/]?', role_controller.RoleListController),
    # (r'/api/role/list-operators[/]?', role_controller.RoleOperatorsController),
    # (r'/api/role/list-all[/]?', role_controller.RoleListAllController),
    # (r'/api/role/create[/]?', role_controller.CreateRoleController),
    # (r'/api/role/resource-list[/]?', role_controller.RoleResourcesController),
    # (r'/api/role/delete/(\d+)[/]?', role_controller.DeleteRoleController),

    # (r'/api/operator/list[/]?', operator_controller.OperatorListController),
    # (r'/api/operator/create[/]?', operator_controller.CreateOperatorController),
    # (r'/api/operator/delete/(\d+)[/]?', operator_controller.DeleteoperatorController),

    # (r'/api/resource/list[/]?', resource_controller.ResourceListController),
    # (r'/api/resource/options-list[/]?', resource_controller.ResourceOptionsListController),
    # (r'/api/resource/tree-data[/]?', resource_controller.ResourceTreeController),
    # (r'/api/resource/create[/]?', resource_controller.CreateResourceController),
    # (r'/api/role/create-resource-rel[/]?', role_controller.CreateRoleResourceRelController),
    # (r'/api/resource/delete/(\d+)[/]?', resource_controller.DeleteResourceController),

    (r'/api/advert/list[/]?', advertisement_controller.AdvertisementListController),
    (r'/api/advert/create[/]?', advertisement_controller.CreateAdvertController),
    (r'/api/advert/delete/(\d+)[/]?', advertisement_controller.DeleteAdvertController),

    # (r'/api/goods/list[/]?', goods_controller.GoodsListController),
    # (r'/api/goods/create[/]?', goods_controller.CreateGoodsController),
    # (r'/api/goods/batch-delete[/]?', goods_controller.BatchDeleteController),
    # (r'/api/goods/batch-update[/]?', goods_controller.BatchUpdateGoodsController),
    # (r'/api/goods/type-list[/]?', goods_controller.GoodsTypeListController),
    # (r'/api/goods/type-create[/]?', goods_controller.CreateGoodsTypeController),
    # (r'/api/goods/type-delete/(\d+)[/]?', goods_controller.DelGoodsTypeController),
    # (r'/api/goods/categories[/]?', goods_controller.AllGoodsCategoryController),
    # (r'/api/goods/price-form-config[/]?', goods_controller.GoodsPriceFormConfigController),

    

    (r'/api/user/list[/]?', user_controller.UserListController),
    (r'/api/user/owner-options[/]?', user_controller.OwnerOptionsController),
    (r'/api/user/manager-options[/]?', user_controller.ManagerOptionsController),
    (r'/api/user/update-user-state[/]?', user_controller.UpdateUserStateController),

    # (r'/api/price/detail-list[/]?', price_controller.PriceTypeDetailListController),
    # (r'/api/price/del-detail/(\d+)[/]?', price_controller.DelPriceTypeDetailController),
    # (r'/api/price/type-create[/]?', price_controller.CreatePriceTypeController),
    # (r'/api/price/type-detail-create[/]?', price_controller.CreatePriceTypeDetailController),
    # (r'/api/price/type-options[/]?', price_controller.PriceTypeOptionsController),
    # (r'/api/price/all-type[/]?', price_controller.AllPriceTypeController),

    # (r'/api/video/del-vtype-ptype[/]?', videotype_controller.DelVideoTypePriceTypeController),
    # (r'/api/video/add-vtype-ptype[/]?', videotype_controller.AddVideoTypePriceTypeController),
    # (r'/api/video/create-video-type[/]?', videotype_controller.CreateVideoTypeController),
    # (r'/api/video/query-search-ptypes[/]?', videotype_controller.PriceTypeListController),
    (r'/api/videotype/list[/]?', videotype_controller.VideoTypeListController),
    (r'/api/videotype/list-all[/]?', videotype_controller.ListAll),
    (r'/api/videoorder/list[/]?', video_order_controller.VideoOrderListController),
    (r'/api/videoorder/detail[/]?', video_order_controller.VideoOrderDetailController),
    # (r'/api/videoorder/state-list[/]?', video_controller.ListVideoOrderStateController),
    (r'/api/videoorder/update[/]?', video_order_controller.ModifyOrder),
    # (r'/api/videoorder/update-operator[/]?', video_order_controller.ChangeOperatorController),

    (r'/api/team/list[/]?', team_controller.TeamListController),
    (r'/api/team/detail[/]?', team_controller.TeamDetailController),
    (r'/api/team/list-all[/]?', team_controller.ListAll),
    (r'/api/team/create[/]?', team_controller.CreateTeamController),
    (r'/api/team/update[/]?', team_controller.UpdateTeamController),
    (r'/api/team/delete/(\d+)[/]?', team_controller.DeleteTeamController),

    (r'/api/element/list[/]?', element_controller.List),
    (r'/api/element/list-all[/]?', element_controller.ListAll),
    (r'/api/element/detail[/]?', element_controller.Detail),
    (r'/api/element/create[/]?', element_controller.CreateElement),
    (r'/api/element/update[/]?', element_controller.UpdateElement),

    (r'/api/distributor/list[/]?', distributor_controller.List),
    (r'/api/distributor/detail[/]?', distributor_controller.Detail),
    (r'/api/distributor/update[/]?', distributor_controller.Update),
    (r'/api/distributor/create[/]?', distributor_controller.Create),
    (r'/api/distributor/query-users[/]?', distributor_controller.QueryDistributorUsers),
    (r'/api/distributor/delete/(\d+)[/]?', distributor_controller.Delete),

    (r'/api/distributor-settle/list[/]?', distributor_controller.SettlementList),
    (r'/api/distributor-settle/update[/]?', distributor_controller.UpdateSettlement),

    (r'/api/category/list[/]?', category_controller.List),
    (r'/api/category/list-all[/]?', category_controller.ListAll),
    (r'/api/category/list-options[/]?', category_controller.ListOptions),
    (r'/api/category/create[/]?', category_controller.Create),
    (r'/api/category/create-options[/]?', category_controller.CreateOptions),
    (r'/api/category/update[/]?', category_controller.Update),
    (r'/api/category/update-options[/]?', category_controller.UpdateOptions),
    (r'/api/category/delete/(\d+)[/]?', category_controller.Delete),
    (r'/api/category/delete-options/(\d+)[/]?', category_controller.DeleteOptions),
]